<template>
  <div class="user">
    <!-- 左侧显示导航区域 -->
    <div class="menu">
      <div class="top">
        <el-icon>
          <HomeFilled />
        </el-icon>
        <span>会员中心</span>
      </div>
      <el-menu router :default-active="`/user/certification?orderId=${route.query.orderId}`" class="el-menu-vertical-demo">
        <el-menu-item :index="`/user/certification?orderId=${route.query.orderId}`">
          <el-icon>
            <document />
          </el-icon>
          <span>实名认证</span>
        </el-menu-item>
        <el-menu-item :index="`/user/order?orderId=${route.query.orderId}`">
          <el-icon>
            <icon-menu />
          </el-icon>
          <span>挂号订单</span>
        </el-menu-item>
        <el-menu-item :index="`/user/patient?orderId=${route.query.orderId}`">
          <el-icon>
            <setting />
          </el-icon>
          <span>就诊人管理</span>
        </el-menu-item>
        <el-menu-item :index="`/user/profile?orderId=${route.query.orderId}`">
          <el-icon>
            <Message />
          </el-icon>
          <span>账号信息</span>
        </el-menu-item>
        <el-menu-item :index="`/user/feedback?orderId=${route.query.orderId}`">
          <el-icon>
            <ChatDotSquare />
          </el-icon>
          <span>意见反馈</span>
        </el-menu-item>
      </el-menu>
    </div>
    <!-- 右侧展示会员中心二级路由组件区域 -->
    <div class="content">
      <router-view></router-view>
    </div>
  </div>
</template>

<script lang="ts" setup>
import {
  Document,
  Menu as IconMenu,
  Message,
  Setting,
  ChatDotSquare,
  HomeFilled
} from "@element-plus/icons-vue";
import { useRoute } from "vue-router";
let route = useRoute()
</script>

<style lang="scss" scoped>
.user {
  display: flex;
  .menu {
    flex: 2;
    .el-menu{
        border-right:none;
    }
    .top {
      margin-top: 20px;
      margin-left: 23px;
      margin-bottom: 10px;
      cursor: pointer;
      .el-icon {
        margin-right: 5px;
      }
    }
  }
  .content {
    flex: 8;
    margin-top:38px;
  }
}
</style>